﻿namespace Net
{
    public abstract class BaseMessage : IMessageSerializer
    {
        public abstract short MsgId { get; }
        
        public abstract void Deserialize(byte[] data, ref int offset);
        
        public abstract byte[] Serialize();
    }
    
    public interface IMessageSerializer
    {
        public void Deserialize(byte[] data, ref int offset);
        
        public byte[] Serialize();
    }
}